[codex] Move moments to the story level#16
Merged
Conversation
1321fdc to
56f4aa8
Compare
56f4aa8 to
7be8473
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves NCP Moments from narrative-local storytelling into required
story.moments[].Moments are storytelling units: scenes, chapters, sequences, acts, levels, or comparable audience-facing containers. They belong to the story as a whole because a single storytelling unit can carry structural material from multiple narratives at once. For example, one scene can turn the public Objective Story, illustrate a private Relationship Story issue, and echo a Main Character Storypoint without becoming three duplicated scenes.
What changed
story.moments[]to the JSON schema and YAML schema twin.story_momentdefinition.storybeat_idandstorypoint_idwithnarrative_id.storypoints[]references on Moments alongsidestorybeats[].narratives[].storytelling.moments[]from the schema so Moments have one unambiguous home.examples/cross-narrative-moments.jsonto demonstrate one Moment referencing Storybeats and Storypoints from two narratives.narrative_idand narrative-local Moments are rejected.SPECIFICATION.md, schema reference docs, history, README, and copyright example.Why
The previous shape implied that a Moment belonged to exactly one narrative because it lived at
narratives[].storytelling.moments[]. That is too narrow for actual storytelling. A scene is experienced by the audience as part of the whole story, and it can legitimately relate to structural elements from different narratives.Putting Moments only on
story.moments[]preserves that audience-facing reality while keeping formal narrative structure intact. The Moment gathers references. Thenarrative_idon each reference tells consumers which narrative owns the Storybeat or Storypoint.Having both
story.moments[]andnarratives[].storytelling.moments[]would create ambiguous ownership and invite duplicated or conflicting exports. This PR makes the model explicit: narratives own structure; the story owns storytelling Moments.Compatibility
This is a schema-shape change for canonical exports because
story.moments[]is now required andnarratives[].storytelling.moments[]is no longer valid.Importers that still receive older nested Moment payloads should migrate those entries up to
story.moments[]and addnarrative_idto each referenced Storybeat or Storypoint.Validation
node tests/validate-schema.js->Schema validation checks passed (8 valid + 11 invalid fixtures).ruby -rjson -ryaml -e "json = JSON.parse(File.read('schema/ncp-schema.json')); yaml = YAML.load_file('schema/ncp-schema.yaml'); abort('schema mismatch') unless json == yaml; puts 'schema JSON/YAML equivalent'"->schema JSON/YAML equivalentgit diff --check-> clean